﻿@model IEnumerable<BaseballGame.Models.Team>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.teamName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Pitcher.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FirstBase.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.SecondBase.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ShortStop.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ThirdBase.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Catcher.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.LeftField.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Rightfield.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CenterField.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.B_FirstBase.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.B_SecondBase.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.B_ShortStop.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.B_ThirdBase.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.B_Catcher.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.B_LeftField.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.B_Midfield.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.B_CenterField.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.BullPen1.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.BullPen2.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.BullPen3.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.BullPen4.player_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Closer.player_name)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.teamName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Pitcher.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FirstBase.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.SecondBase.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ShortStop.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ThirdBase.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Catcher.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LeftField.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Rightfield.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CenterField.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.B_FirstBase.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.B_SecondBase.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.B_ShortStop.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.B_ThirdBase.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.B_Catcher.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.B_LeftField.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.B_Midfield.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.B_CenterField.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BullPen1.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BullPen2.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BullPen3.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BullPen4.player_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Closer.player_name)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
